#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<list>
#include<deque>
#include"Queue.h"
#include"Stack.h"
using namespace std;

struct A
{
	A(int a=1,int b=2,int c=3)
		:_a(a)
		,_b(b)
		,_c(c)
	{ }
	int _a = 1;
	int _b = 2;
	int _c = 3;
};

void test1()
{
	list<int> li;
	li.push_back(1);
	li.push_back(2);
	li.push_back(3);
	li.push_back(4);
	li.push_back(5);
	li.push_back(6);

	list<int>::reverse_iterator rit = li.rbegin();

	while (rit != li.rend())
	{
		cout << *rit << " ";
		rit++;
	}

	cout << endl;

	vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.push_back(6);

	vector<int>::reverse_iterator rv = v.rbegin();

	while (rv != v.rend())
	{
		cout << *rv << " ";
		rv++;
	}
	cout << endl;
}

void test2()
{
	list<A> li;
	li.push_back({ 1,2,3 });
	li.push_back({ 2,3,4 });
	li.push_back({ 3,4,5 });
	li.push_back({ 4,5,6 });
	li.push_back({ 5,6,7 });
	li.push_back({ 6,7,8 });

	list<A>::reverse_iterator rit = li.rbegin();

	while (rit != li.rend())
	{
		cout << rit->_a << " " << rit->_b << " " << rit->_c << " ";
		rit++;
	}

	cout << endl;

	vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.push_back(6);

	vector<int>::reverse_iterator rv = --v.rend();

	while (rv != v.rbegin())
	{
		cout << *rv << " ";
		--rv;
	}
}

void test3()
{
	Stack::stack<int> st;
	//Stack::stack<int,List::list<int>> st;
	//Stack::stack<int,vector<int>> st;

	st.push(1);
	st.push(2);
	st.push(3);
	st.push(4);
	st.push(5);

	while (!st.empty())
	{
		cout << st.top() << " ";
		st.pop();
	}
	cout << endl;

	Queue::queue<int> q;
	//Queue::queue<int,list<int>> q;
	//Queue::queue<int,Vector::vector<int>> q;

	q.push(1);
	q.push(2);
	q.push(3);
	q.push(4);
	q.push(5);

	while (!q.empty())
	{
		cout << q.front() << " ";
		q.pop();
	}
}
void test4()
{
	Queue::priority_queue<int> q;
	q.push(1);
	q.push(3);
	q.push(5);
	q.push(2);
	q.push(7);
	q.push(6);

	while (!q.empty())
	{
		cout << q.top() << " ";
		q.pop();
	}

}
int main()
{
	//test1();
	//test2();
	//test3();
	test4();
	return 0;
}